package com.lantosec.hmrp.modules.morality.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.morality.vo.MoralityCommentTemplateVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 评语模板定义 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-17
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MoralityCommentTemplate extends BaseEntity<MoralityCommentTemplateVO> {

    private static final long serialVersionUID = 1L;
    public MoralityCommentTemplate(MoralityCommentTemplateVO vo){
        this.commentTemplateId = vo.getCommentTemplateId();
        this.commentTemplateName = vo.getCommentTemplateName();
        this.moralityStep = vo.getMoralityStep();
        this.commentContent = vo.getCommentContent();
    }

    @Override
    public MoralityCommentTemplateVO convertToVO(){
        return new MoralityCommentTemplateVO(this);
    }


    /**
     * 评语模板ID
     */
    @TableId(value = "comment_template_id", type = IdType.AUTO)
    private Integer commentTemplateId;

    /**
     * 评语模板名称
     */
    private String commentTemplateName;

    /**
     * 考评环节(1自评 2科室 3党支部 4考评委员会)
     */
    private Integer moralityStep;

    /**
     * 评语内容
     */
    private String commentContent;


    public enum ColName {
        comment_template_id, comment_template_name, morality_step, comment_content, 
    }
}
